package person.aoao.library.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import person.aoao.library.entity.BorrowList;
import person.aoao.library.result.ResponseData;
import person.aoao.library.vo.ListData;

/**
 * (BorrowList)表服务接口
 *
 * @author makejava
 * @since 2023-05-05 10:15:41
 */
public interface BorrowListService {

    /**
     * 通过ID查询单条数据
     *
     * @param borrowid 主键
     * @return 实例对象
     */
    BorrowList queryById(Integer borrowid);

    /**
     * 分页查询
     *
     * @param borrowList  筛选条件
     * @param pageRequest 分页对象
     * @return 查询结果
     */
    Page<BorrowList> queryByPage(BorrowList borrowList, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param borrowList 实例对象
     * @return 实例对象
     */
    BorrowList insert(BorrowList borrowList);

    /**
     * 修改数据
     *
     * @param borrowList 实例对象
     * @return 实例对象
     */
    BorrowList update(BorrowList borrowList);

    /**
     * 通过主键删除数据
     *
     * @param borrowid 主键
     * @return 是否成功
     */
    boolean deleteById(Integer borrowid);

    ListData  getBorrowList(String uid, Integer page, Integer limit);

    ResponseData queryByUid(String uid, Integer num, Integer page);

    ResponseData selectAll(Integer num, Integer page);

    ResponseData searchBorrow(String keyWord, Integer state, Integer num, Integer page);
}
